package com.yeyks.service.impl;

import com.yeyks.dal.dao.VipInfoMapper;
import com.yeyks.dal.domain.VipInfo;
import com.yeyks.service.VipInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author fuchangshuai
 * @date 2019/2/27 1:05 PM
 */
@Service
public class VipInfoServiceImpl implements VipInfoService {
    @Autowired
    private VipInfoMapper vipInfoMapper;

    @Override
    public void insertReturnId(VipInfo vipInfo) {
        vipInfoMapper.insertReturnId(vipInfo);
    }

    /**
     * 通过vip类型查询该用户是否是vip
     * @param id
     * @param type
     * @return
     */
    @Override
    public VipInfo selectVipInfoByUserIdAndType(Integer id, Integer type) {
        return vipInfoMapper.selectVipInfoByUserIdAndType(id, type);
    }
}
